49 research outputs found

    Signal Classes: A Mechanism for Building Synchronous and Persistent Signal Networks

    Get PDF

    ContextWorkflow: A Monadic DSL for Compensable and Interruptible Executions (Artifact)

    Get PDF
    This artifact provides the Scala, Haskell, and Purescript implementations of ContextWorkflow, an embedded domain-specific language for interruptible and compensable executions, and demonstrates the maze search example described in the companion paper. The Haskell and Purescript implementations provide the core language constructs including texttt{checkpoint} for partial aborts and texttt{sub} for sub-workflows and show that ContextWorkflow can be embedded in eager and lazy languages as described in the companion paper. The Scala implementation does not only provide user-friendly syntax of ContextWorkflow but also gives the maze search example as an interactive GUI application

    ContextWorkflow: A Monadic DSL for Compensable and Interruptible Executions

    Get PDF
    Context-aware applications, whose behavior reactively depends on the time-varying status of the surrounding environment - such as network connection, battery level, and sensors - are getting more and more pervasive and important. The term "context-awareness" usually suggests prompt reactions to context changes: as the context change signals that the current execution cannot be continued, the application should immediately abort its execution, possibly does some clean-up tasks, and suspend until the context allows it to restart. Interruptions, or asynchronous exceptions, are useful to achieve context-awareness. It is, however, difficult to program with interruptions in a compositional way in most programming languages because their support is too primitive, relying on synchronous exception handling mechanism such as try-catch. We propose a new domain-specific language ContextWorkflow for interruptible programs as a solution to the problem. A basic unit of an interruptible program is a workflow, i.e., a sequence of atomic computations accompanied with compensation actions. The uniqueness of ContextWorkflow is that, during its execution, a workflow keeps watching the context between atomic actions and decides if the computation should be continued, aborted, or suspended. Our contribution of this paper is as follows; (1) the design of a workflow-like language with asynchronous interruption, checkpointing, sub-workflows and suspension; (2) a formal semantics of the core language; (3) a monadic interpreter corresponding to the semantics; and (4) its concrete implementation as an embedded domain-specific language in Scala

    Towards Modular Reasoning For Context-Oriented Programs

    No full text
    Context-oriented programming (COP) is an approach to modularity for applications whose behavior may vary depending on the status of the environment in which they execute and the software\u27s own state. Languages supporting COP provide partial methods to modularly define behavioral variations of methods specific to a context, layers to group the partial methods and layer activation mechanisms to dynamically compose layers. Because the behavior of these partial methods often differs from that of the base methods they override, reasoning about context-oriented programs seems to require a case analysis based on partial methods and context information from the entire program, which is not scalable. In this paper we explain a new language feature, layer interfaces, which allows modular specification and verification of context-oriented programs. We demonstrate these techniques by using examples
    corecore